//*****************************************************************************
// JFab (http://code.google.com/p/jfab)
// Copyright (c) 2011-2012 JFab.org
// Admin jfab@jeffreythompson.net
//
// See the file "LICENSE.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//*****************************************************************************

package org.jfab.core.factory;

import org.jfab.core.collection.CGAnnotationList;
import org.jfab.core.collection.CGTypeList;
import org.jfab.core.collection.CommentList;
import org.jfab.core.collection.ModifierList;
import org.jfab.core.model.CGProperty;
import org.jfab.core.model.CGType;

/**
 * Defines methods required by a code generator property factory.
 */
public interface CGPropertyFactory
{
    /**
     * @param propertyType Property type.
     * @param propertyName Property name.
     * 
     * @return a new code generator property.
     */
    CGProperty createProperty(CGType propertyType, String propertyName);

    /**
     * @param referencedTypes Referenced types.
     * @param commentLines Comment lines.
     * @param annotations Annotations.
     * @param modifiers Modifiers.
     * @param propertyType Property type.
     * @param propertyName Property name.
     * @param initialValue Initial value.
     * @param isGetter Flag indicating whether this field requires a getter
     *            method.
     * @param isSetter Flag indicating whether this field requires a setter
     *            method.
     * @param isUsedInIdentity Flag indicating whether this field is included in
     *            object identity.
     * 
     * @return a new code generator property.
     */
    CGProperty createProperty(CGTypeList referencedTypes,
            CommentList commentLines, CGAnnotationList annotations,
            ModifierList modifiers, CGType propertyType, String propertyName,
            String initialValue, Boolean isGetter, Boolean isSetter,
            Boolean isUsedInIdentity);
}
